ENG-11734 | feat(osf): add DownloadEvent model and migration with dashb…#11810
Conversation
…oard access group
…oard access group
| DASHBOARD_USERS = [ | ||
| 'sheredko.andriy@gmail.com', | ||
| 'bodintsov@exoft.net', | ||
| 'isokhan@exoft.net', | ||
| 'ykopka@exoft.net', | ||
| 'bgeiger@cos.io', | ||
| 'osmand@cos.io', | ||
| ] |
There was a problem hiding this comment.
Ramya shouldn't have access? She is in the channel as well
There was a problem hiding this comment.
Good catch — added her.
| # what was downloaded | ||
| resource_guid = models.CharField(max_length=255, blank=True, default='', db_index=True) |
There was a problem hiding this comment.
Shouldn't it be FK to Node or AbstractNode (in case of downloading files from Registration)?
If it's for a case when a node is deleted, ignore this comment
There was a problem hiding this comment.
Kept it as a plain GUID string on purpose. This telemetry is specifically for the August mass-deletion of private projects, so the resources will get hard-deleted — an FK would cascade/null and we'd lose which project the download was for, which defeats the point. Storing the GUID keeps the record durable.
It also covers nodes, registrations and preprints uniformly (a preprint isn't an AbstractNode, so a Node FK wouldn't fit those). So yeah — the node-deletion case you mentioned is exactly why it's a string.
| # what was downloaded | ||
| resource_guid = models.CharField(max_length=255, blank=True, default='', db_index=True) | ||
| path = models.TextField(blank=True, default='') | ||
| name = models.CharField(max_length=255, blank=True, default='') |
There was a problem hiding this comment.
What will "name" contain? If file name, then can't we extract name from a file path? If folder name, we can fetch it from path as well
There was a problem hiding this comment.
Fair — dropped it. It's just the basename of path, so we'll derive it in the dashboard when we need it instead of storing it twice.
…oard access group
…oard access group
…oard access group
Ticket
Purpose
Changes
Side Effects
QE Notes
CE Notes
Documentation